Method Summary |
|
__init__ (self,
year,
month,
day,
hour,
minute,
second,
obj,
ticks,
sql,
list)
Either set one of the sets options:
obj - Database module DateTime class
ticks - An object time.time()
year, month, day, hour, minute, second - Each integers except second which can be a float. |
|
__cmp__(self,
other)
|
|
__getitem__ (self,
item)
Enable dictionary-style attribute reading for year, month, day, hour, minute and second. |
|
__str__ (self)
Return the object as standard SQL. |
|
asSQL (self)
Return the date and time as a standard SQL string of the format 'YYYY-MM-DD HH:MM::SS.ss'. |
|
asSQLDate (self)
Return the date as a standard SQL string of the format 'YYYY-MM-DD'. |
|
asSQLDateTime (self)
Return the date and time as a standard SQL string of the format 'YYYY-MM-DD HH:MM::SS.ss'. |
|
asSQLTime (self)
Return the time as a standard SQL string in the format 'HH:MM::SS.ss'. |
|
asSQLTimestamp (self)
Return the date and time as a standard SQL timestamp string of the format 'YYYYMMDDHHMMSS'. |
|
list(self)
|
|
tuple (self)
Returns the date and time as a python tuple as constructed by time.localtime(). |
|
_addZeros (self,
num,
s)
Private function to add an appropriate number of zeros to s such that len(s) is num. |
|
_compareDate(self,
other)
|
|
_compareTime(self,
other)
|
__init__(self,
year=None,
month=None,
day=None,
hour=None,
minute=None,
second=None,
obj=None,
ticks=None,
sql=None,
list=None)
(Constructor)
Either set one of the sets options:
obj - Database module DateTime class
ticks - An object time.time()
year, month, day, hour, minute, second - Each integers except second which can be a float.
-
|